<?php (!defined('IN_SYSTEM') || !defined('ADMIN_PRE')) && exit('Access Denied!');?>
{admintemplate header}
<div class="box">
	<div class="heading">
	<h1>撰写文章</h1>
	<div class="buttons">
	<a href="{url admin.php?m=link&f=add}">添加链接</a>
	<a href="{url admin.php?m=link}">所有链接</a>
	<a href="{url admin.php?m=category&r=link}" >链接分类</a>
	</div>
	</div>
	<div class="main">

	<form name="save" method="post" action="?m=link&f=save" onsubmit="return save_link()">
	<input type="hidden" name="savetype" value="edit" />
	<input type="hidden" name="id" value="<?=$result['lid']?>" />
	<table width="100%" cellspacing="0" class="sub">
		<tr>
			<td colspan="2"><div id="tip"></div></td>
		</tr>
		<tr>
			<td width="80" align="right">名称：</td>
			<td><input type="text" name="title" class="input" size="20" value="<?=$result['title']?>" /> 
			<select name="cid"><?=get_category_options($result['cid'],1)?></select>
			</td>
		</tr>
		<tr>
			<td align="right">URL：</td>
			<td><input type="text" name="url" class="input" size="50" value="<?=$result['url']?>" /> <span>别忘了加上http://</span></td>
		</tr>
		<tr>
			<td align="right">跳转：</td>
			<td><input type="text" name="rssurl" class="input" size="50" value="<?=$result['rssurl']?>"/> <span>要跳转到的地址</span></td>
		</tr>
		<tr>
			<td align="right">LOGO：</td>
			<td><input type="text" name="logo" class="input" size="50" value="<?=$result['logo']?>" /> <span>别忘了加上http://</span></td>
		</tr>
		<tr>
			<td align="right">描述：</td>
			<td><textarea name="summary" rows="5" cols="50"><?=$result['summary']?></textarea>
			</td>
		</tr>
		<tr>
			<td align="right">其它：</td>
			<td><input type="radio" name="visible" id="visible1" value="1" class="checkbox" <?=($result['visible'] ? 'checked="checked"' : '')?> /><label for="visible1">显示</label> <input type="radio" name="visible" id="visible0" value="0" class="checkbox" <?=(!$result['visible'] ? 'checked="checked"' : '')?> /><label for="visible0">隐藏</label>
			</td>
		</tr>
		<tr class="bg2"><td></td><td><input type="submit" class="button" value="保存链接" /> <input type="button" class="button" onclick="window.location.href='admin.php?m=link'" value="取消返回" /></td></tr>
	</table>
	</form>

	</div>
</div>
<?php include(ADMIN_ROOT.'template/footer.tpl.php');?>